package com.study.boot.event;

import lombok.Data;
import org.springframework.context.ApplicationEvent;

/**
 * 事件类型定义
 * 开发步骤：
 *  1、定义事件类型
 *  2、定义事件发布者
 *  3、定时事件监听者
 *  [4、开启异步]
 *  [5、自定义异步线程池]
 * @author fangdengfu
 * @date 2020/7/4 9:35
 */
@Data
public class NotifyEvent extends ApplicationEvent {

    private static final String TYPE = "notifyEvent";

    private String msg;

    public NotifyEvent(Object source) {
        super(source);
    }

    public NotifyEvent(String msg) {
        super(TYPE);
        this.msg = msg;
    }
}
